.class public Lcom/esfile/screen/recorder/media/b;
.super Ljava/lang/Object;
.source "DuThumbGrabber.java"


# annotations
.annotation build Landroid/annotation/TargetApi;
    value = 0x15
.end annotation

.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/esfile/screen/recorder/media/b$b;
    }
.end annotation


# instance fields
.field private a:Ljava/lang/String;

.field private b:Ljava/io/FileDescriptor;

.field private c:Les/n7;

.field private d:Lcom/esfile/screen/recorder/media/b$b;

.field private e:F

.field private f:I

.field private g:I

.field private h:Lcom/esfile/screen/recorder/media/util/y;

.field private i:Lcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;

.field private j:I

.field private k:I

.field private l:Lcom/esfile/screen/recorder/media/util/y;

.field private final m:Ljava/lang/Object;

.field private n:I

.field private final o:Ljava/lang/Object;

.field private p:[J

.field private q:J

.field private r:Z

.field private final s:Ljava/lang/Object;

.field private t:J

.field private u:Les/m7$h;


# direct methods
.method public constructor <init>()V
    .locals 2

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/high16 v0, -0x40800000    # -1.0f

    .line 2
    iput v0, p0, Lcom/esfile/screen/recorder/media/b;->e:F

    const/4 v0, -0x1

    .line 3
    iput v0, p0, Lcom/esfile/screen/recorder/media/b;->f:I

    .line 4
    iput v0, p0, Lcom/esfile/screen/recorder/media/b;->g:I

    const/4 v1, 0x0

    .line 5
    iput-object v1, p0, Lcom/esfile/screen/recorder/media/b;->h:Lcom/esfile/screen/recorder/media/util/y;

    .line 6
    sget-object v1, Lcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;->UNKNOWN:Lcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;

    iput-object v1, p0, Lcom/esfile/screen/recorder/media/b;->i:Lcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;

    .line 7
    iput v0, p0, Lcom/esfile/screen/recorder/media/b;->j:I

    .line 8
    iput v0, p0, Lcom/esfile/screen/recorder/media/b;->k:I

    .line 9
    new-instance v1, Ljava/lang/Object;

    invoke-direct {v1}, Ljava/lang/Object;-><init>()V

    iput-object v1, p0, Lcom/esfile/screen/recorder/media/b;->m:Ljava/lang/Object;

    .line 10
    iput v0, p0, Lcom/esfile/screen/recorder/media/b;->n:I

    .line 11
    new-instance v0, Ljava/lang/Object;

    invoke-direct {v0}, Ljava/lang/Object;-><init>()V

    iput-object v0, p0, Lcom/esfile/screen/recorder/media/b;->o:Ljava/lang/Object;

    const/4 v0, 0x0

    .line 12
    iput-boolean v0, p0, Lcom/esfile/screen/recorder/media/b;->r:Z

    .line 13
    new-instance v0, Ljava/lang/Object;

    invoke-direct {v0}, Ljava/lang/Object;-><init>()V

    iput-object v0, p0, Lcom/esfile/screen/recorder/media/b;->s:Ljava/lang/Object;

    const-wide/16 v0, -0x1

    .line 14
    iput-wide v0, p0, Lcom/esfile/screen/recorder/media/b;->t:J

    .line 15
    new-instance v0, Lcom/esfile/screen/recorder/media/b$a;

    invoke-direct {v0, p0}, Lcom/esfile/screen/recorder/media/b$a;-><init>(Lcom/esfile/screen/recorder/media/b;)V

    iput-object v0, p0, Lcom/esfile/screen/recorder/media/b;->u:Les/m7$h;

    return-void
.end method

.method static synthetic a(Lcom/esfile/screen/recorder/media/b;)I
    .locals 0

    .line 3
    iget p0, p0, Lcom/esfile/screen/recorder/media/b;->n:I

    return p0
.end method

.method private a(J)J
    .locals 8

    .line 105
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/b;->p:[J

    const-wide/16 v1, -0x1

    if-eqz v0, :cond_2

    array-length v3, v0

    if-gtz v3, :cond_0

    goto :goto_1

    .line 106
    :cond_0
    array-length v3, v0

    const/4 v4, 0x0

    :goto_0
    if-ge v4, v3, :cond_2

    aget-wide v5, v0, v4

    cmp-long v7, v5, p1

    if-lez v7, :cond_1

    goto :goto_1

    :cond_1
    add-int/lit8 v4, v4, 0x1

    move-wide v1, v5

    goto :goto_0

    :cond_2
    :goto_1
    return-wide v1
.end method

.method static synthetic a(Lcom/esfile/screen/recorder/media/b;J)J
    .locals 0

    .line 2
    iput-wide p1, p0, Lcom/esfile/screen/recorder/media/b;->t:J

    return-wide p1
.end method

.method private a(III)V
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    const/4 v0, -0x1

    if-eqz p3, :cond_1

    const/16 v1, 0xb4

    if-eq p3, v1, :cond_1

    if-ne p3, v0, :cond_0

    goto :goto_0

    .line 89
    :cond_0
    new-instance v1, Lcom/esfile/screen/recorder/media/util/y;

    invoke-direct {v1, p2, p1}, Lcom/esfile/screen/recorder/media/util/y;-><init>(II)V

    iput-object v1, p0, Lcom/esfile/screen/recorder/media/b;->l:Lcom/esfile/screen/recorder/media/util/y;

    goto :goto_1

    .line 90
    :cond_1
    :goto_0
    new-instance v1, Lcom/esfile/screen/recorder/media/util/y;

    invoke-direct {v1, p1, p2}, Lcom/esfile/screen/recorder/media/util/y;-><init>(II)V

    iput-object v1, p0, Lcom/esfile/screen/recorder/media/b;->l:Lcom/esfile/screen/recorder/media/util/y;

    .line 91
    :goto_1
    new-instance p1, Ljava/lang/StringBuilder;

    invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V

    const-string p2, "video size:"

    invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object p2, p0, Lcom/esfile/screen/recorder/media/b;->l:Lcom/esfile/screen/recorder/media/util/y;

    invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    const-string p2, " rotationDegree:"

    invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    const-string p2, "dtgr"

    invoke-static {p2, p1}, Lcom/esfile/screen/recorder/media/util/k;->c(Ljava/lang/String;Ljava/lang/String;)V

    .line 92
    iget p1, p0, Lcom/esfile/screen/recorder/media/b;->j:I

    if-ne p1, v0, :cond_2

    .line 93
    iget-object p1, p0, Lcom/esfile/screen/recorder/media/b;->l:Lcom/esfile/screen/recorder/media/util/y;

    invoke-virtual {p1}, Lcom/esfile/screen/recorder/media/util/y;->b()I

    move-result p1

    iput p1, p0, Lcom/esfile/screen/recorder/media/b;->j:I

    .line 94
    :cond_2
    iget p1, p0, Lcom/esfile/screen/recorder/media/b;->k:I

    if-ne p1, v0, :cond_3

    .line 95
    iget-object p1, p0, Lcom/esfile/screen/recorder/media/b;->l:Lcom/esfile/screen/recorder/media/util/y;

    invoke-virtual {p1}, Lcom/esfile/screen/recorder/media/util/y;->a()I

    move-result p1

    iput p1, p0, Lcom/esfile/screen/recorder/media/b;->k:I

    .line 96
    :cond_3
    iget p1, p0, Lcom/esfile/screen/recorder/media/b;->e:F

    const/4 p3, 0x0

    cmpl-float p3, p1, p3

    if-lez p3, :cond_4

    .line 97
    invoke-virtual {p0, p1}, Lcom/esfile/screen/recorder/media/b;->a(F)V

    .line 98
    :cond_4
    iget p1, p0, Lcom/esfile/screen/recorder/media/b;->f:I

    if-lez p1, :cond_5

    .line 99
    invoke-virtual {p0, p1}, Lcom/esfile/screen/recorder/media/b;->b(I)V

    .line 100
    :cond_5
    iget p1, p0, Lcom/esfile/screen/recorder/media/b;->g:I

    if-lez p1, :cond_6

    .line 101
    invoke-virtual {p0, p1}, Lcom/esfile/screen/recorder/media/b;->a(I)V

    .line 102
    :cond_6
    iget-object p1, p0, Lcom/esfile/screen/recorder/media/b;->h:Lcom/esfile/screen/recorder/media/util/y;

    if-eqz p1, :cond_7

    .line 103
    invoke-virtual {p1}, Lcom/esfile/screen/recorder/media/util/y;->b()I

    move-result p1

    iget-object p3, p0, Lcom/esfile/screen/recorder/media/b;->h:Lcom/esfile/screen/recorder/media/util/y;

    invoke-virtual {p3}, Lcom/esfile/screen/recorder/media/util/y;->a()I

    move-result p3

    iget-object v0, p0, Lcom/esfile/screen/recorder/media/b;->i:Lcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;

    invoke-virtual {p0, p1, p3, v0}, Lcom/esfile/screen/recorder/media/b;->a(IILcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;)V

    .line 104
    :cond_7
    new-instance p1, Ljava/lang/StringBuilder;

    invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V

    const-string p3, "grab size:"

    invoke-virtual {p1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget p3, p0, Lcom/esfile/screen/recorder/media/b;->j:I

    invoke-virtual {p1, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string p3, "x"

    invoke-virtual {p1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget p3, p0, Lcom/esfile/screen/recorder/media/b;->k:I

    invoke-virtual {p1, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-static {p2, p1}, Lcom/esfile/screen/recorder/media/util/k;->c(Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method private a(IIIZ)V
    .locals 1

    if-eqz p4, :cond_1

    if-le p2, p3, :cond_0

    goto :goto_0

    :cond_0
    move p3, p2

    :goto_0
    int-to-float p1, p1

    int-to-float p2, p2

    div-float/2addr p1, p2

    int-to-float p2, p3

    mul-float p1, p1, p2

    float-to-int p1, p1

    goto :goto_2

    :cond_1
    if-le p1, p3, :cond_2

    goto :goto_1

    :cond_2
    move p3, p1

    :goto_1
    int-to-float p2, p2

    int-to-float p1, p1

    div-float/2addr p2, p1

    int-to-float p1, p3

    mul-float p2, p2, p1

    float-to-int p1, p2

    move v0, p3

    move p3, p1

    move p1, v0

    :goto_2
    add-int/lit8 p1, p1, 0xf

    and-int/lit8 p1, p1, -0x10

    .line 86
    iput p1, p0, Lcom/esfile/screen/recorder/media/b;->j:I

    add-int/lit8 p3, p3, 0xf

    and-int/lit8 p1, p3, -0x10

    .line 87
    iput p1, p0, Lcom/esfile/screen/recorder/media/b;->k:I

    return-void
.end method

.method static synthetic a(Lcom/esfile/screen/recorder/media/b;I)V
    .locals 0

    .line 1
    invoke-direct {p0, p1}, Lcom/esfile/screen/recorder/media/b;->c(I)V

    return-void
.end method

.method private b(JZ)Z
    .locals 4

    .line 20
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/b;->o:Ljava/lang/Object;

    monitor-enter v0

    .line 21
    :try_start_0
    iget v1, p0, Lcom/esfile/screen/recorder/media/b;->n:I

    const/4 v2, 0x2

    const/4 v3, 0x0

    if-ne v1, v2, :cond_0

    .line 22
    monitor-exit v0

    return v3

    .line 23
    :cond_0
    invoke-direct {p0, p1, p2, p3}, Lcom/esfile/screen/recorder/media/b;->c(JZ)Z

    move-result p1

    if-nez p1, :cond_1

    .line 24
    monitor-exit v0

    return v3

    :cond_1
    const/4 p1, -0x1

    .line 25
    iput p1, p0, Lcom/esfile/screen/recorder/media/b;->n:I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 26
    :goto_0
    :try_start_1
    iget p2, p0, Lcom/esfile/screen/recorder/media/b;->n:I

    if-ne p2, p1, :cond_2

    .line 27
    iget-object p2, p0, Lcom/esfile/screen/recorder/media/b;->o:Ljava/lang/Object;

    invoke-virtual {p2}, Ljava/lang/Object;->wait()V
    :try_end_1
    .catch Ljava/lang/InterruptedException; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_0

    :catch_0
    move-exception p1

    .line 28
    :try_start_2
    invoke-virtual {p1}, Ljava/lang/InterruptedException;->printStackTrace()V

    .line 29
    :cond_2
    iget p1, p0, Lcom/esfile/screen/recorder/media/b;->n:I

    const/4 p2, 0x3

    if-ne p1, p2, :cond_3

    .line 30
    invoke-virtual {p0}, Lcom/esfile/screen/recorder/media/b;->d()V

    .line 31
    invoke-virtual {p0}, Lcom/esfile/screen/recorder/media/b;->e()Z

    .line 32
    :cond_3
    iget p1, p0, Lcom/esfile/screen/recorder/media/b;->n:I

    const/4 p2, 0x1

    if-ne p1, p2, :cond_4

    const/4 v3, 0x1

    :cond_4
    monitor-exit v0

    return v3

    :catchall_0
    move-exception p1

    .line 33
    monitor-exit v0
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    goto :goto_2

    :goto_1
    throw p1

    :goto_2
    goto :goto_1
.end method

.method private c(I)V
    .locals 3

    .line 16
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/b;->o:Ljava/lang/Object;

    monitor-enter v0

    .line 17
    :try_start_0
    iget v1, p0, Lcom/esfile/screen/recorder/media/b;->n:I

    const/4 v2, 0x2

    if-eq v1, v2, :cond_0

    .line 18
    iput p1, p0, Lcom/esfile/screen/recorder/media/b;->n:I

    .line 19
    iget-object p1, p0, Lcom/esfile/screen/recorder/media/b;->o:Ljava/lang/Object;

    invoke-virtual {p1}, Ljava/lang/Object;->notify()V

    .line 20
    :cond_0
    monitor-exit v0

    return-void

    :catchall_0
    move-exception p1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1
.end method

.method private c(JZ)Z
    .locals 10

    .line 3
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/b;->m:Ljava/lang/Object;

    monitor-enter v0

    .line 4
    :try_start_0
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->c:Les/n7;

    const/4 v2, 0x0

    if-nez v1, :cond_0

    .line 5
    monitor-exit v0

    return v2

    :cond_0
    const/4 v1, 0x1

    if-eqz p3, :cond_2

    .line 6
    invoke-direct {p0, p1, p2}, Lcom/esfile/screen/recorder/media/b;->a(J)J

    move-result-wide v3

    const-wide/16 v5, 0x0

    cmp-long p3, v3, v5

    if-ltz p3, :cond_1

    .line 7
    iget-wide v5, p0, Lcom/esfile/screen/recorder/media/b;->t:J

    cmp-long p3, v5, v3

    if-ltz p3, :cond_1

    iget-wide v3, p0, Lcom/esfile/screen/recorder/media/b;->t:J

    cmp-long p3, v3, p1

    if-gez p3, :cond_1

    .line 8
    iget-object v3, p0, Lcom/esfile/screen/recorder/media/b;->c:Les/n7;

    const-wide/16 v6, -0x1

    const/4 v8, 0x1

    const/4 v9, 0x0

    move-wide v4, p1

    invoke-virtual/range {v3 .. v9}, Les/m7;->a(JJZZ)V

    goto :goto_1

    .line 9
    :cond_1
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b;->c:Les/n7;

    const-wide/16 v5, -0x1

    const/4 v7, 0x1

    move-wide v3, p1

    invoke-virtual/range {v2 .. v7}, Les/m7;->a(JJZ)V

    goto :goto_0

    .line 10
    :cond_2
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b;->c:Les/n7;

    const-wide/16 v5, -0x1

    const/4 v7, 0x0

    move-wide v3, p1

    invoke-virtual/range {v2 .. v7}, Les/m7;->a(JJZ)V

    :goto_0
    const/4 v2, 0x1

    .line 11
    :goto_1
    iget-object p1, p0, Lcom/esfile/screen/recorder/media/b;->c:Les/n7;

    invoke-virtual {p1}, Les/m7;->e()Z

    move-result p1

    if-eqz p1, :cond_4

    if-eqz v2, :cond_3

    .line 12
    iget-object p1, p0, Lcom/esfile/screen/recorder/media/b;->c:Les/n7;

    invoke-virtual {p1}, Les/m7;->a()V

    .line 13
    :cond_3
    iget-object p1, p0, Lcom/esfile/screen/recorder/media/b;->c:Les/n7;

    invoke-virtual {p1}, Les/m7;->j()V

    goto :goto_2

    .line 14
    :cond_4
    iget-object p1, p0, Lcom/esfile/screen/recorder/media/b;->c:Les/n7;

    invoke-virtual {p1}, Les/m7;->k()V

    .line 15
    :goto_2
    monitor-exit v0

    return v1

    :catchall_0
    move-exception p1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1
.end method

.method private f()Landroid/graphics/Bitmap;
    .locals 2

    .line 1
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/b;->m:Ljava/lang/Object;

    monitor-enter v0

    .line 2
    :try_start_0
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->d:Lcom/esfile/screen/recorder/media/b$b;

    if-nez v1, :cond_0

    const/4 v1, 0x0

    .line 3
    monitor-exit v0

    return-object v1

    .line 4
    :cond_0
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 5
    invoke-virtual {v1}, Lcom/esfile/screen/recorder/media/b$b;->c()Landroid/graphics/Bitmap;

    move-result-object v0

    return-object v0

    :catchall_0
    move-exception v1

    .line 6
    :try_start_1
    monitor-exit v0
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw v1
.end method

.method private g()Z
    .locals 6

    const/4 v0, 0x0

    .line 1
    :try_start_0
    new-instance v1, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;

    invoke-direct {v1}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;-><init>()V

    .line 2
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b;->a:Ljava/lang/String;

    if-eqz v2, :cond_0

    .line 3
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b;->a:Ljava/lang/String;

    invoke-virtual {v1, v2}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->a(Ljava/lang/String;)V

    goto :goto_0

    .line 4
    :cond_0
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b;->b:Ljava/io/FileDescriptor;

    invoke-virtual {v1, v2}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->a(Ljava/io/FileDescriptor;)V

    .line 5
    :goto_0
    invoke-virtual {v1}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->a()Les/f9;

    move-result-object v1

    if-eqz v1, :cond_4

    .line 6
    iget-object v2, v1, Les/f9;->h:Les/f9$b;

    iget-object v2, v2, Les/f9$b;->e:[J

    .line 7
    iget-object v3, v1, Les/f9;->h:Les/f9$b;

    iget-object v3, v3, Les/f9$b;->c:[J

    .line 8
    iget-wide v4, v1, Les/f9;->d:J

    iput-wide v4, p0, Lcom/esfile/screen/recorder/media/b;->q:J
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    const-string v1, "dtgr"

    if-eqz v2, :cond_2

    .line 9
    :try_start_1
    array-length v4, v2

    if-lez v4, :cond_2

    .line 10
    iput-object v2, p0, Lcom/esfile/screen/recorder/media/b;->p:[J

    .line 11
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const-string v5, "syncs.length:"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    array-length v2, v2

    invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v2, " frames.length:"

    invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    if-eqz v3, :cond_1

    array-length v2, v3

    goto :goto_1

    :cond_1
    const/4 v2, 0x0

    :goto_1
    invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Lcom/esfile/screen/recorder/media/util/k;->c(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_2

    :cond_2
    if-eqz v3, :cond_3

    .line 12
    array-length v2, v3

    if-lez v2, :cond_3

    .line 13
    iput-object v3, p0, Lcom/esfile/screen/recorder/media/b;->p:[J

    .line 14
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "frames.length:"

    invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    array-length v3, v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Lcom/esfile/screen/recorder/media/util/k;->c(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_1
    .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0

    :cond_3
    :goto_2
    const/4 v0, 0x1

    return v0

    :catch_0
    move-exception v1

    .line 15
    invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V

    :cond_4
    return v0
.end method

.method private h()Z
    .locals 6

    .line 1
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/b;->m:Ljava/lang/Object;

    monitor-enter v0

    .line 2
    :try_start_0
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->c:Les/n7;

    if-nez v1, :cond_0

    const/4 v1, 0x0

    .line 3
    monitor-exit v0

    return v1

    .line 4
    :cond_0
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->d:Lcom/esfile/screen/recorder/media/b$b;

    if-eqz v1, :cond_1

    .line 5
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->d:Lcom/esfile/screen/recorder/media/b$b;

    invoke-virtual {v1}, Lcom/esfile/screen/recorder/media/b$b;->b()V

    .line 6
    :cond_1
    iget v1, p0, Lcom/esfile/screen/recorder/media/b;->j:I

    iget v2, p0, Lcom/esfile/screen/recorder/media/b;->k:I

    iget-object v3, p0, Lcom/esfile/screen/recorder/media/b;->l:Lcom/esfile/screen/recorder/media/util/y;

    .line 7
    invoke-virtual {v3}, Lcom/esfile/screen/recorder/media/util/y;->b()I

    move-result v3

    iget-object v4, p0, Lcom/esfile/screen/recorder/media/b;->l:Lcom/esfile/screen/recorder/media/util/y;

    invoke-virtual {v4}, Lcom/esfile/screen/recorder/media/util/y;->a()I

    move-result v4

    iget-object v5, p0, Lcom/esfile/screen/recorder/media/b;->i:Lcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;

    .line 8
    invoke-static {v1, v2, v3, v4, v5}, Lcom/esfile/screen/recorder/media/b$b;->a(IIIILcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;)Lcom/esfile/screen/recorder/media/b$b;

    move-result-object v1

    iput-object v1, p0, Lcom/esfile/screen/recorder/media/b;->d:Lcom/esfile/screen/recorder/media/b$b;

    .line 9
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b;->c:Les/n7;

    invoke-virtual {v1}, Lcom/esfile/screen/recorder/media/b$b;->a()Landroid/view/Surface;

    move-result-object v1

    invoke-virtual {v2, v1}, Les/n7;->a(Landroid/view/Surface;)V

    .line 10
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->c:Les/n7;

    invoke-virtual {v1}, Les/m7;->i()Z

    move-result v1

    monitor-exit v0

    return v1

    :catchall_0
    move-exception v1

    .line 11
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1
.end method

.method private i()V
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    iget-boolean v0, p0, Lcom/esfile/screen/recorder/media/b;->r:Z

    if-nez v0, :cond_0

    invoke-direct {p0}, Lcom/esfile/screen/recorder/media/b;->g()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 2
    :cond_0
    invoke-virtual {p0}, Lcom/esfile/screen/recorder/media/b;->e()Z

    move-result v0

    if-eqz v0, :cond_1

    return-void

    .line 3
    :cond_1
    new-instance v0, Ljava/io/IOException;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Video "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b;->a:Ljava/lang/String;

    if-eqz v2, :cond_2

    goto :goto_0

    :cond_2
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b;->b:Ljava/io/FileDescriptor;

    :goto_0
    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    const-string v2, " cannot be parsed."

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw v0
.end method


# virtual methods
.method public a()J
    .locals 2

    .line 88
    iget-wide v0, p0, Lcom/esfile/screen/recorder/media/b;->q:J

    return-wide v0
.end method

.method public a(JZ)Landroid/graphics/Bitmap;
    .locals 5

    .line 79
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    .line 80
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b;->s:Ljava/lang/Object;

    monitor-enter v2

    .line 81
    :try_start_0
    invoke-direct {p0, p1, p2, p3}, Lcom/esfile/screen/recorder/media/b;->b(JZ)Z

    move-result p1

    if-eqz p1, :cond_0

    .line 82
    invoke-direct {p0}, Lcom/esfile/screen/recorder/media/b;->f()Landroid/graphics/Bitmap;

    move-result-object p1

    const-string p2, "dtgr"

    .line 83
    new-instance p3, Ljava/lang/StringBuilder;

    invoke-direct {p3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "getThumbnailBitmapAt cost "

    invoke-virtual {p3, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v3

    sub-long/2addr v3, v0

    invoke-virtual {p3, v3, v4}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    const-string v0, "ms"

    invoke-virtual {p3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p3

    invoke-static {p2, p3}, Lcom/esfile/screen/recorder/media/util/k;->c(Ljava/lang/String;Ljava/lang/String;)V

    .line 84
    monitor-exit v2

    return-object p1

    .line 85
    :cond_0
    monitor-exit v2

    const/4 p1, 0x0

    return-object p1

    :catchall_0
    move-exception p1

    monitor-exit v2
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1
.end method

.method public a(F)V
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    const/4 v0, 0x0

    cmpg-float v0, p1, v0

    if-gtz v0, :cond_0

    return-void

    .line 22
    :cond_0
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/b;->m:Ljava/lang/Object;

    monitor-enter v0

    .line 23
    :try_start_0
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->l:Lcom/esfile/screen/recorder/media/util/y;

    if-nez v1, :cond_1

    .line 24
    iput p1, p0, Lcom/esfile/screen/recorder/media/b;->e:F

    const/4 p1, -0x1

    .line 25
    iput p1, p0, Lcom/esfile/screen/recorder/media/b;->j:I

    .line 26
    iput p1, p0, Lcom/esfile/screen/recorder/media/b;->k:I

    .line 27
    iput p1, p0, Lcom/esfile/screen/recorder/media/b;->f:I

    .line 28
    iput p1, p0, Lcom/esfile/screen/recorder/media/b;->g:I

    const/4 p1, 0x0

    .line 29
    iput-object p1, p0, Lcom/esfile/screen/recorder/media/b;->h:Lcom/esfile/screen/recorder/media/util/y;

    .line 30
    monitor-exit v0

    return-void

    .line 31
    :cond_1
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->l:Lcom/esfile/screen/recorder/media/util/y;

    invoke-virtual {v1}, Lcom/esfile/screen/recorder/media/util/y;->b()I

    move-result v1

    int-to-float v1, v1

    mul-float v1, v1, p1

    float-to-int v1, v1

    .line 32
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b;->l:Lcom/esfile/screen/recorder/media/util/y;

    invoke-virtual {v2}, Lcom/esfile/screen/recorder/media/util/y;->a()I

    move-result v2

    int-to-float v2, v2

    mul-float v2, v2, p1

    float-to-int v2, v2

    add-int/lit8 v1, v1, 0xf

    and-int/lit8 v1, v1, -0x10

    .line 33
    iput v1, p0, Lcom/esfile/screen/recorder/media/b;->j:I

    add-int/lit8 v2, v2, 0xf

    and-int/lit8 v1, v2, -0x10

    .line 34
    iput v1, p0, Lcom/esfile/screen/recorder/media/b;->k:I

    .line 35
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->c:Les/n7;

    if-eqz v1, :cond_3

    .line 36
    invoke-direct {p0}, Lcom/esfile/screen/recorder/media/b;->h()Z

    move-result v1

    if-eqz v1, :cond_2

    goto :goto_0

    .line 37
    :cond_2
    new-instance v1, Ljava/io/IOException;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "Scale "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    const-string p1, " cannot be set"

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-direct {v1, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw v1

    :cond_3
    :goto_0
    const-string p1, "dtgr"

    .line 38
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "[setGrabScale]: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v2, p0, Lcom/esfile/screen/recorder/media/b;->j:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v2, "x"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v2, p0, Lcom/esfile/screen/recorder/media/b;->k:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {p1, v1}, Lcom/esfile/screen/recorder/media/util/k;->c(Ljava/lang/String;Ljava/lang/String;)V

    .line 39
    monitor-exit v0

    return-void

    :catchall_0
    move-exception p1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1
.end method

.method public a(I)V
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    if-gez p1, :cond_0

    return-void

    .line 40
    :cond_0
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/b;->m:Ljava/lang/Object;

    monitor-enter v0

    .line 41
    :try_start_0
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->l:Lcom/esfile/screen/recorder/media/util/y;

    if-nez v1, :cond_1

    .line 42
    iput p1, p0, Lcom/esfile/screen/recorder/media/b;->g:I

    const/4 p1, -0x1

    .line 43
    iput p1, p0, Lcom/esfile/screen/recorder/media/b;->f:I

    const/high16 v1, -0x40800000    # -1.0f

    .line 44
    iput v1, p0, Lcom/esfile/screen/recorder/media/b;->e:F

    .line 45
    iput p1, p0, Lcom/esfile/screen/recorder/media/b;->j:I

    .line 46
    iput p1, p0, Lcom/esfile/screen/recorder/media/b;->k:I

    const/4 p1, 0x0

    .line 47
    iput-object p1, p0, Lcom/esfile/screen/recorder/media/b;->h:Lcom/esfile/screen/recorder/media/util/y;

    .line 48
    monitor-exit v0

    return-void

    .line 49
    :cond_1
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->l:Lcom/esfile/screen/recorder/media/util/y;

    invoke-virtual {v1}, Lcom/esfile/screen/recorder/media/util/y;->b()I

    move-result v1

    .line 50
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b;->l:Lcom/esfile/screen/recorder/media/util/y;

    invoke-virtual {v2}, Lcom/esfile/screen/recorder/media/util/y;->a()I

    move-result v2

    .line 51
    invoke-static {v1, v2}, Ljava/lang/Math;->max(II)I

    move-result v3

    if-le v3, p1, :cond_4

    if-ge v1, v2, :cond_2

    const/4 v3, 0x1

    goto :goto_0

    :cond_2
    const/4 v3, 0x0

    .line 52
    :goto_0
    invoke-direct {p0, v1, v2, p1, v3}, Lcom/esfile/screen/recorder/media/b;->a(IIIZ)V

    .line 53
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->c:Les/n7;

    if-eqz v1, :cond_4

    .line 54
    invoke-direct {p0}, Lcom/esfile/screen/recorder/media/b;->h()Z

    move-result v1

    if-eqz v1, :cond_3

    goto :goto_1

    .line 55
    :cond_3
    new-instance v1, Ljava/io/IOException;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "Max size "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string p1, " cannot be set"

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-direct {v1, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw v1

    :cond_4
    :goto_1
    const-string p1, "dtgr"

    .line 56
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "[setGrabMaxSize]: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v2, p0, Lcom/esfile/screen/recorder/media/b;->j:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v2, "x"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v2, p0, Lcom/esfile/screen/recorder/media/b;->k:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {p1, v1}, Lcom/esfile/screen/recorder/media/util/k;->c(Ljava/lang/String;Ljava/lang/String;)V

    .line 57
    monitor-exit v0

    return-void

    :catchall_0
    move-exception p1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1
.end method

.method public a(II)V
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 9
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/b;->m:Ljava/lang/Object;

    monitor-enter v0

    const/high16 v1, -0x40800000    # -1.0f

    .line 10
    :try_start_0
    iput v1, p0, Lcom/esfile/screen/recorder/media/b;->e:F

    const/4 v1, -0x1

    .line 11
    iput v1, p0, Lcom/esfile/screen/recorder/media/b;->f:I

    .line 12
    iput v1, p0, Lcom/esfile/screen/recorder/media/b;->g:I

    const/4 v1, 0x0

    .line 13
    iput-object v1, p0, Lcom/esfile/screen/recorder/media/b;->h:Lcom/esfile/screen/recorder/media/util/y;

    const/4 v1, 0x1

    if-lez p1, :cond_0

    .line 14
    iget v2, p0, Lcom/esfile/screen/recorder/media/b;->j:I

    if-eq p1, v2, :cond_0

    .line 15
    iput p1, p0, Lcom/esfile/screen/recorder/media/b;->j:I

    const/4 v2, 0x1

    goto :goto_0

    :cond_0
    const/4 v2, 0x0

    :goto_0
    if-lez p2, :cond_1

    .line 16
    iget v3, p0, Lcom/esfile/screen/recorder/media/b;->k:I

    if-eq p2, v3, :cond_1

    .line 17
    iput p2, p0, Lcom/esfile/screen/recorder/media/b;->k:I

    goto :goto_1

    :cond_1
    move v1, v2

    :goto_1
    if-eqz v1, :cond_3

    .line 18
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->c:Les/n7;

    if-eqz v1, :cond_3

    .line 19
    invoke-direct {p0}, Lcom/esfile/screen/recorder/media/b;->h()Z

    move-result v1

    if-eqz v1, :cond_2

    goto :goto_2

    .line 20
    :cond_2
    new-instance v1, Ljava/io/IOException;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "Size "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string p1, "x"

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string p1, " cannot be set"

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-direct {v1, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw v1

    .line 21
    :cond_3
    :goto_2
    monitor-exit v0

    return-void

    :catchall_0
    move-exception p1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1
.end method

.method public a(IILcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;)V
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    if-lez p1, :cond_6

    if-gtz p2, :cond_0

    goto/16 :goto_2

    .line 58
    :cond_0
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/b;->m:Ljava/lang/Object;

    monitor-enter v0

    .line 59
    :try_start_0
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->l:Lcom/esfile/screen/recorder/media/util/y;

    if-nez v1, :cond_1

    .line 60
    new-instance v1, Lcom/esfile/screen/recorder/media/util/y;

    invoke-direct {v1, p1, p2}, Lcom/esfile/screen/recorder/media/util/y;-><init>(II)V

    iput-object v1, p0, Lcom/esfile/screen/recorder/media/b;->h:Lcom/esfile/screen/recorder/media/util/y;

    .line 61
    iput-object p3, p0, Lcom/esfile/screen/recorder/media/b;->i:Lcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;

    const/4 p1, -0x1

    .line 62
    iput p1, p0, Lcom/esfile/screen/recorder/media/b;->g:I

    .line 63
    iput p1, p0, Lcom/esfile/screen/recorder/media/b;->f:I

    const/high16 p2, -0x40800000    # -1.0f

    .line 64
    iput p2, p0, Lcom/esfile/screen/recorder/media/b;->e:F

    .line 65
    iput p1, p0, Lcom/esfile/screen/recorder/media/b;->j:I

    .line 66
    iput p1, p0, Lcom/esfile/screen/recorder/media/b;->k:I

    .line 67
    monitor-exit v0

    return-void

    .line 68
    :cond_1
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->l:Lcom/esfile/screen/recorder/media/util/y;

    invoke-virtual {v1}, Lcom/esfile/screen/recorder/media/util/y;->b()I

    move-result v1

    .line 69
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b;->l:Lcom/esfile/screen/recorder/media/util/y;

    invoke-virtual {v2}, Lcom/esfile/screen/recorder/media/util/y;->a()I

    move-result v2

    if-gt v1, p1, :cond_3

    if-le v2, p2, :cond_2

    goto :goto_0

    .line 70
    :cond_2
    sget-object p3, Lcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;->UNKNOWN:Lcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;

    iput-object p3, p0, Lcom/esfile/screen/recorder/media/b;->i:Lcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;

    goto :goto_1

    :cond_3
    :goto_0
    add-int/lit8 v1, p1, 0xf

    and-int/lit8 v1, v1, -0x10

    .line 71
    iput v1, p0, Lcom/esfile/screen/recorder/media/b;->j:I

    add-int/lit8 v1, p2, 0xf

    and-int/lit8 v1, v1, -0x10

    .line 72
    iput v1, p0, Lcom/esfile/screen/recorder/media/b;->k:I

    .line 73
    iput-object p3, p0, Lcom/esfile/screen/recorder/media/b;->i:Lcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;

    .line 74
    iget-object p3, p0, Lcom/esfile/screen/recorder/media/b;->c:Les/n7;

    if-eqz p3, :cond_5

    .line 75
    invoke-direct {p0}, Lcom/esfile/screen/recorder/media/b;->h()Z

    move-result p3

    if-eqz p3, :cond_4

    goto :goto_1

    .line 76
    :cond_4
    new-instance p3, Ljava/io/IOException;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Grab into "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string p1, "x"

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string p1, " cannot be set"

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-direct {p3, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw p3

    :cond_5
    :goto_1
    const-string p3, "dtgr"

    .line 77
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "[grabInto]: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v2, p0, Lcom/esfile/screen/recorder/media/b;->j:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v2, "x"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v2, p0, Lcom/esfile/screen/recorder/media/b;->k:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v2, " "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string p1, "x"

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-static {p3, p1}, Lcom/esfile/screen/recorder/media/util/k;->c(Ljava/lang/String;Ljava/lang/String;)V

    .line 78
    monitor-exit v0

    return-void

    :catchall_0
    move-exception p1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1

    :cond_6
    :goto_2
    return-void
.end method

.method public a(Ljava/lang/String;)V
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 4
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/b;->m:Ljava/lang/Object;

    monitor-enter v0

    .line 5
    :try_start_0
    iput-object p1, p0, Lcom/esfile/screen/recorder/media/b;->a:Ljava/lang/String;

    const/4 p1, 0x0

    .line 6
    iput-object p1, p0, Lcom/esfile/screen/recorder/media/b;->b:Ljava/io/FileDescriptor;

    .line 7
    invoke-direct {p0}, Lcom/esfile/screen/recorder/media/b;->i()V

    .line 8
    monitor-exit v0

    return-void

    :catchall_0
    move-exception p1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1
.end method

.method public b()Lcom/esfile/screen/recorder/media/util/y;
    .locals 1

    .line 19
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/b;->l:Lcom/esfile/screen/recorder/media/util/y;

    return-object v0
.end method

.method public b(I)V
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    if-gez p1, :cond_0

    return-void

    .line 1
    :cond_0
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/b;->m:Ljava/lang/Object;

    monitor-enter v0

    .line 2
    :try_start_0
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->l:Lcom/esfile/screen/recorder/media/util/y;

    if-nez v1, :cond_1

    .line 3
    iput p1, p0, Lcom/esfile/screen/recorder/media/b;->f:I

    const/4 p1, -0x1

    .line 4
    iput p1, p0, Lcom/esfile/screen/recorder/media/b;->g:I

    const/high16 v1, -0x40800000    # -1.0f

    .line 5
    iput v1, p0, Lcom/esfile/screen/recorder/media/b;->e:F

    .line 6
    iput p1, p0, Lcom/esfile/screen/recorder/media/b;->j:I

    .line 7
    iput p1, p0, Lcom/esfile/screen/recorder/media/b;->k:I

    const/4 p1, 0x0

    .line 8
    iput-object p1, p0, Lcom/esfile/screen/recorder/media/b;->h:Lcom/esfile/screen/recorder/media/util/y;

    .line 9
    monitor-exit v0

    return-void

    .line 10
    :cond_1
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->l:Lcom/esfile/screen/recorder/media/util/y;

    invoke-virtual {v1}, Lcom/esfile/screen/recorder/media/util/y;->b()I

    move-result v1

    .line 11
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b;->l:Lcom/esfile/screen/recorder/media/util/y;

    invoke-virtual {v2}, Lcom/esfile/screen/recorder/media/util/y;->a()I

    move-result v2

    .line 12
    invoke-static {v1, v2}, Ljava/lang/Math;->min(II)I

    move-result v3

    if-le v3, p1, :cond_4

    if-le v1, v2, :cond_2

    const/4 v3, 0x1

    goto :goto_0

    :cond_2
    const/4 v3, 0x0

    .line 13
    :goto_0
    invoke-direct {p0, v1, v2, p1, v3}, Lcom/esfile/screen/recorder/media/b;->a(IIIZ)V

    .line 14
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->c:Les/n7;

    if-eqz v1, :cond_4

    .line 15
    invoke-direct {p0}, Lcom/esfile/screen/recorder/media/b;->h()Z

    move-result v1

    if-eqz v1, :cond_3

    goto :goto_1

    .line 16
    :cond_3
    new-instance v1, Ljava/io/IOException;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "Max small width "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string p1, " cannot be set"

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-direct {v1, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw v1

    :cond_4
    :goto_1
    const-string p1, "dtgr"

    .line 17
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "[setGrabMaxSmallWidth]: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v2, p0, Lcom/esfile/screen/recorder/media/b;->j:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v2, "x"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v2, p0, Lcom/esfile/screen/recorder/media/b;->k:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {p1, v1}, Lcom/esfile/screen/recorder/media/util/k;->c(Ljava/lang/String;Ljava/lang/String;)V

    .line 18
    monitor-exit v0

    return-void

    :catchall_0
    move-exception p1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1
.end method

.method public c()V
    .locals 2

    const-string v0, "dtgr"

    const-string v1, "release thumb grabber"

    .line 1
    invoke-static {v0, v1}, Lcom/esfile/screen/recorder/media/util/k;->c(Ljava/lang/String;Ljava/lang/String;)V

    .line 2
    invoke-virtual {p0}, Lcom/esfile/screen/recorder/media/b;->d()V

    return-void
.end method

.method public d()V
    .locals 3

    const/4 v0, 0x2

    .line 1
    invoke-direct {p0, v0}, Lcom/esfile/screen/recorder/media/b;->c(I)V

    .line 2
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/b;->m:Ljava/lang/Object;

    monitor-enter v0

    :try_start_0
    const-string v1, "dtgr"

    const-string v2, "release video decoder and draw wrapper"

    .line 3
    invoke-static {v1, v2}, Lcom/esfile/screen/recorder/media/util/k;->c(Ljava/lang/String;Ljava/lang/String;)V

    .line 4
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->c:Les/n7;

    const/4 v2, 0x0

    if-eqz v1, :cond_0

    .line 5
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->c:Les/n7;

    invoke-virtual {v1}, Les/m7;->h()V

    .line 6
    iput-object v2, p0, Lcom/esfile/screen/recorder/media/b;->c:Les/n7;

    .line 7
    :cond_0
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->d:Lcom/esfile/screen/recorder/media/b$b;

    if-eqz v1, :cond_1

    .line 8
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->d:Lcom/esfile/screen/recorder/media/b$b;

    invoke-virtual {v1}, Lcom/esfile/screen/recorder/media/b$b;->b()V

    .line 9
    iput-object v2, p0, Lcom/esfile/screen/recorder/media/b;->d:Lcom/esfile/screen/recorder/media/b$b;

    .line 10
    :cond_1
    monitor-exit v0

    return-void

    :catchall_0
    move-exception v1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1
.end method

.method public e()Z
    .locals 9

    const/4 v0, 0x2

    .line 1
    invoke-direct {p0, v0}, Lcom/esfile/screen/recorder/media/b;->c(I)V

    .line 2
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/b;->m:Ljava/lang/Object;

    monitor-enter v0

    .line 3
    :try_start_0
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->d:Lcom/esfile/screen/recorder/media/b$b;

    if-eqz v1, :cond_0

    .line 4
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->d:Lcom/esfile/screen/recorder/media/b$b;

    invoke-virtual {v1}, Lcom/esfile/screen/recorder/media/b$b;->b()V

    :cond_0
    const-string v1, "dtgr"

    .line 5
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "setupDecoder videoSize:"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v3, p0, Lcom/esfile/screen/recorder/media/b;->l:Lcom/esfile/screen/recorder/media/util/y;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    const-string v3, " grabSize:"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v3, p0, Lcom/esfile/screen/recorder/media/b;->j:I

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v3, "x"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v3, p0, Lcom/esfile/screen/recorder/media/b;->k:I

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Lcom/esfile/screen/recorder/media/util/k;->c(Ljava/lang/String;Ljava/lang/String;)V

    .line 6
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->c:Les/n7;

    if-eqz v1, :cond_1

    .line 7
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->c:Les/n7;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Les/m7;->a(Les/m7$h;)V

    .line 8
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/b;->c:Les/n7;

    invoke-virtual {v1}, Les/m7;->h()V

    .line 9
    iput-object v2, p0, Lcom/esfile/screen/recorder/media/b;->c:Les/n7;

    .line 10
    :cond_1
    new-instance v1, Les/n7;

    invoke-direct {v1}, Les/n7;-><init>()V

    .line 11
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b;->a:Ljava/lang/String;

    if-eqz v2, :cond_2

    .line 12
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b;->a:Ljava/lang/String;

    invoke-virtual {v1, v2}, Les/m7;->b(Ljava/lang/String;)Z

    move-result v2

    goto :goto_0

    .line 13
    :cond_2
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b;->b:Ljava/io/FileDescriptor;

    invoke-virtual {v1, v2}, Les/m7;->a(Ljava/io/FileDescriptor;)Z

    move-result v2

    :goto_0
    const/4 v3, 0x0

    if-nez v2, :cond_3

    .line 14
    invoke-virtual {v1}, Les/m7;->h()V

    .line 15
    monitor-exit v0

    return v3

    .line 16
    :cond_3
    invoke-virtual {v1}, Les/m7;->b()Landroid/media/MediaFormat;

    move-result-object v2
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    :try_start_1
    const-string v4, "width"

    .line 17
    invoke-virtual {v2, v4}, Landroid/media/MediaFormat;->getInteger(Ljava/lang/String;)I

    move-result v4

    const-string v5, "height"

    invoke-virtual {v2, v5}, Landroid/media/MediaFormat;->getInteger(Ljava/lang/String;)I

    move-result v5

    const-string v6, "rotation-degrees"

    const/4 v7, -0x1

    .line 18
    invoke-static {v2, v6, v7}, Lcom/esfile/screen/recorder/media/util/s;->a(Landroid/media/MediaFormat;Ljava/lang/String;I)I

    move-result v2

    .line 19
    invoke-direct {p0, v4, v5, v2}, Lcom/esfile/screen/recorder/media/b;->a(III)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 20
    :try_start_2
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/b;->u:Les/m7$h;

    invoke-virtual {v1, v2}, Les/m7;->a(Les/m7$h;)V

    .line 21
    iget v2, p0, Lcom/esfile/screen/recorder/media/b;->j:I

    iget v4, p0, Lcom/esfile/screen/recorder/media/b;->k:I

    iget-object v5, p0, Lcom/esfile/screen/recorder/media/b;->l:Lcom/esfile/screen/recorder/media/util/y;

    .line 22
    invoke-virtual {v5}, Lcom/esfile/screen/recorder/media/util/y;->b()I

    move-result v5

    iget-object v6, p0, Lcom/esfile/screen/recorder/media/b;->l:Lcom/esfile/screen/recorder/media/util/y;

    invoke-virtual {v6}, Lcom/esfile/screen/recorder/media/util/y;->a()I

    move-result v6

    iget-object v8, p0, Lcom/esfile/screen/recorder/media/b;->i:Lcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;

    .line 23
    invoke-static {v2, v4, v5, v6, v8}, Lcom/esfile/screen/recorder/media/b$b;->a(IIIILcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;)Lcom/esfile/screen/recorder/media/b$b;

    move-result-object v2

    iput-object v2, p0, Lcom/esfile/screen/recorder/media/b;->d:Lcom/esfile/screen/recorder/media/b$b;

    .line 24
    invoke-virtual {v2}, Lcom/esfile/screen/recorder/media/b$b;->a()Landroid/view/Surface;

    move-result-object v2

    invoke-virtual {v1, v2}, Les/n7;->a(Landroid/view/Surface;)V

    .line 25
    invoke-virtual {v1, v3}, Les/m7;->a(Z)V

    .line 26
    invoke-virtual {v1}, Les/m7;->g()Z

    move-result v2

    if-nez v2, :cond_4

    .line 27
    invoke-virtual {p0}, Lcom/esfile/screen/recorder/media/b;->c()V

    .line 28
    monitor-exit v0

    return v3

    .line 29
    :cond_4
    iput v7, p0, Lcom/esfile/screen/recorder/media/b;->n:I

    .line 30
    iput-object v1, p0, Lcom/esfile/screen/recorder/media/b;->c:Les/n7;

    const/4 v1, 0x1

    .line 31
    monitor-exit v0

    return v1

    .line 32
    :catch_0
    invoke-virtual {v1}, Les/m7;->h()V

    .line 33
    monitor-exit v0

    return v3

    :catchall_0
    move-exception v1

    .line 34
    monitor-exit v0
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    throw v1
.end method
